from tornado.websocket import WebSocketHandler
from tornado.web import RequestHandler

class RobbitHandler(RequestHandler):
    def get(self):
        self.render('msg/robbit.html')

class MessageHandler(WebSocketHandler):
    def open(self, *args, **kwargs):
        ip = self.request.remote_ip
        #  向客户端发送消息,表示客户请求连接
        self.write_message('您好,%s' % ip)
